<html lang="en">
<head>
	<meta charset="utf-8">
	<title>聊天室</title>
	<link rel="stylesheet" class="ui" href="/static/css/semantic.min.css"/>
    <link rel="stylesheet" class="ui" href="/static/css/body.css"/>
    <link rel="stylesheet" class="ui" href="/static/css/chat.css"/>	
</head>

<body>
	<div class="ui fixed transparent inverted main menu">
        <div class="container">
            <div class="title item">
                <b>{{cookieUser}}&nbsp</b> 在线聊天系统 
            </div>

            <div class="right menu">
                <div class="title item">
                    {%if usertype == 2%}
						<b><a href='/admin'>管理</a></b>
					{%end%}
					{%if usertype != -1%}
						&nbsp <b><a href='/create'>创建聊天室</a></b>
					{%end%}
                    &nbsp<b><a href="/modify"> 修改个人信息 </a></b>
                    &nbsp<b><a href="/logout"> 注销 </a></b>
                </div>
            </div>
        </div>
    </div>
    <!--room列表-->
    <div class="ui grid column five">
	    {% for room in roomlist %}
	    	<!-- #room[0]:roomid,[1]:roomname,[2]:created_time,[3]:userid-->
	    	<!-- room[4]:owner_name-->
	    	<div class="column">
			    <a href="/room/{{room[0]}}">
		            <div class="ui segment">
		                <h3>{{room[1]}}</h3>
		                <p>
		                创建者：{{room[4]}} 
		                </p>
		                <p>
		                创建时间：{{room[2]}}
		                </p>
		            </div>
			    </button>
		    </div>
	    {% end %}
    </div>
</body>